EntityBillboard
<template>
    <div class="EntityBillboardLocationMark">
        <cesium-viewer @viewerAlready="viewerAlready"/>
        <div>
            <h2>Cesium官方沙盒各种entity实例<el-link>https://sandcastle.cesium.com/index.html?src=Box.html&label=Geometries</el-link></h2>
        </div>
    </div>
</template>
<script>
    import CesiumViewer from "../../CesiumViewer";
    const location4 = require("../../../assets/images/location4.png");
    export default {
        name: "EntityBillboardLocationMark",
        //import引入的组件需要注入到对象中才能使用",
        components: {CesiumViewer},
        methods: {
            //初始化Cesium
            viewerAlready() {
                window.viewer.scene.globe.depthTestAgainstTerrain=true; //设置该属性为 true\false，开启\关闭 地形遮盖(高程遮挡）
                window.viewer.camera.setView({
                    destination: Cesium.Cartesian3.fromDegrees(
                        87.5531,
                        28.5517,
                        15000
                    ),
                    orientation:{
                        // 指向
                        heading:0.0,
                        // 视角
                        pitch:-20.0,
                        roll:0.0
                    }
                });
                window.viewer.entities.add({
                    position : Cesium.Cartesian3.fromDegrees( 87.5531,
                        28.5917),
                    billboard:{
                        image: location4, // default: undefined
                        width: 30, // default: undefined
                        height: 40, // default: undefined
                        heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                        horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // default
                        verticalOrigin: Cesium.VerticalOrigin.BOTTOM // default: CENTER
                    }
                });
            }
        }
    };
</script>
